package cn.iocoder.yudao.module.lfd.dal.dataobject.order;

import cn.iocoder.yudao.module.lfd.controller.admin.appointment.vo.AppointmentEnum;
import lombok.*;

import java.util.*;
import java.time.*;

import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;

/**
 * 订单 DO
 *
 * @author 知一
 */
@TableName("lfd_order")
@KeySequence("lfd_order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderDO extends BaseDO {

    /**
     * id
     */
    @TableId
    private String id;
    /**
     * 预约id
     */
    private Long appointmentId;
    /**
     * 状态
     */
    private AppointmentEnum status;


    public OrderDO success() {
        this.status = AppointmentEnum.SUCCESS;
        return this;
    }

    public OrderDO fail() {
        this.status = AppointmentEnum.FAIL;
        return this;
    }
}
